Hybris UX Api icon

Hybris UX Api

(0 reviews)

POST Customer

Customer

This operation creates a customer entity.

URL

http://[localhost]:[port]/ecom-ux/v1/{businessId}/customer

Base URI Parameter

NameTypeM/ODescription
businessIdstringMbusinessId string M Business unit identifier. Example: JM,PA,PR,CR

Headers

NameTypeM/ODescription
X-Correlation-IDstringOThis is a unique identifier for the current call chain that can be used to tie together log entries on multiple layers. Could be uuid value, Min 16 Characters Example: 644e1dd7-2a7f-18fb-b8ed-ed78c3F92c2b
channelIdstringOExpected Value = ECOM
Defalut value : ECOM
lobstringMThe Line of Business has to be Mentioned Eg: FIXED
For CR:lob = FIXED is passed in request body also.

Security Headers

NameTypeM/ODescription
client-idstringMClient Id value for Client Id Enforcement policy. Environment Specific Value. Eg: 6f0ed16a7b494d76b2d60e05bc3b3332
client-secretstringMClient secret value for Client Id Enforcement policy. Environment Specific Value, eg: e4CD4D43449846aA9D8Cb9c43fAd324a

Request Body

http://[localhost]:[port]/ecom-ux/v1/{businessId}/customer

Request and Response Model

Actual implementation for CR (Request Body)

{
    "name": "GILBERTO ALMEMAN TOSTY",
    "contactMedium": [
        {
            "mediumType": "Telephone",
            "characteristic": {
                "phoneNumber": "+50688777575",
                "country": "Costa Rica",
                "contactType": "home"
            }
        },
        {
            "mediumType": "Telephone",
            "characteristic": {
                "phoneNumber": "+50688777576",
                "country": "Costa Rica",
                "contactType": "mobile"
            }
        },
        {
            "mediumType": "Email",
            "characteristic": {
                "emailAddress": "jhon.doe@abc.com",
                "contactType": "email"
            }
        },
        {
            "mediumType": "address",
            "characteristic": {
                "city": "PUNTARENAS",
                "country": "COSTA RICA",
                "stateOrProvince": "PUNTARENAS",
                "street1": "estoy en puntarenas2",
                "street2": "CARMEN"
            }
        }
    ],
    "characteristic": [
        {
            "name": "idProof",
            "value": "01-4498-5920"
        },
        {
            "name": "idProofType",
            "value": "CEDULA FISICA"
        },
        {
            "name": "amnistia",
            "value": "N"
        },
        {
            "name": "fraudCategory",
            "value": "Oro"
        },
        {
            "name": "customerType",
            "value": "RESIDENCIAL"
        },
        {
            "name": "customerCategory",
            "value": "CLIENTE VIP"
        },
        {
            "name": "role",
            "value": "DUEÑO"
        },
        {
            "name": "firstName",
            "value": "GILBERTO"
        },
        {
            "name": "lastName",
            "value": "ALMEMAN"
        },
        {
            "name": "lastName2",
            "value": "TOSTY"
        },
        {
            "name": "gender",
            "value": "MASCULINO"
        },
        {
            "name": "lob",
            "value": "FIXED"
        },
          {
            "name": "district",
            "value": "PUNTARENAS"
        }
    ]
}

Actual implemenation for CR (Response Body) 201 Created

{
  "id": "1-2F741ZR",
  "name": "GILBERTO ALMEMAN TOSTY",
    "characteristic": [
        {
            "name": "addressId",
            "value": "1-2F741ZW"
        },
        {
            "name": "contactId",
            "value": "1-2F741ZY"
        }
    ],
  "@type": "Customer"
}

Actual implemenation for PA - liberate (Request Body)

{
   "name":"TEST 25Feb2022",
   "contactMedium":[
      {
         "mediumType":"Address",
         "preferred":false,
         "characteristic":{
            "street1":"512",
            "street2":"Boulevard CostaDeleste",
            "city":"PHCountryClub CostaDelEste",
            "stateOrProvince":"Juan Dias",
            "postCode":"00000",
            "country":"Panama"
         }
      },
      {
         "mediumType":"Telephone",
         "preferred":true,
         "characteristic":{
            "phoneNumer":"1234566789",
            "contactType":"home"
         }
      },
      {
         "mediumType":"Email",
         "preferred":false,
         "characteristic":{
            "emailAddress":"donald.slicon@silicon.com",
            "contactType":"email"
         }
      }
   ],
    "characteristic": [{
        "name": "dateOfBirth",
        "value": "2000-06-12"
    }, {
        "name": "title",
        "value": "Mr"
    }, {
        "name": "gender",
        "value": "M"
    }, {
        "name": "type",
        "value": "RES"
    }, {
        "name": "companyCode",
        "value": "CWP"
    },
        {
      "name": "idProof",
      "valueType": "C",
      "value": "8-997-999"
    },{
        "name": "sourceEPC",
        "value": "LIBERATE"
    }, {
        "name": "nationality",
        "value": "PANA"
    }, {
        "name": "employmentStatus",
        "value": "N"
    }]
}

Actual implemenation for PA - liberate (Response Body) 201 Created

{
    "id": "329001",
    "account": [
        {
            "id": "329001000000"
        }
    ]
}

Actual implemenation for JM - liberate (Request Body)

{
    "name": "TEST 25sFeb22",
    "contactMedium": [
        {
            "mediumType": "Address",
            "preferred": false,
            "characteristic": {
                "street1": "35",
                "street2": "sullivan avenue",
                "city": "KINGSTON",
                "stateOrProvince": "ST.ANDREW",
                "postCode": "00006",
                "country": "Jamaica"
            }
        },
        {
            "mediumType": "Telephone",
            "preferred": true,
            "characteristic": {
                "phoneNumer": "1234566789",
                "contactType": "home"
            }
        },
        {
            "mediumType": "Email",
            "preferred": false,
            "characteristic": {
                "emailAddress": "donald.slicon@silicon.com",
                "contactType": "email"
            }
        }
    ],
    "characteristic": [
        {
            "name": "dateOfBirth",
            "valueType": "yyyy-MM-dd",
            "value": "2000-06-12"
        },
        {
            "name": "title",
            "valueType": "Salutation Mr. Mrs. etc",
            "value": "Mr"
        },
        {
            "name": "gender",
            "valueType": "string",
            "value": "M"
        },
        {
            "name": "type",
            "valueType": "customerType",
            "value": "RES"
        },
        {
            "name": "companyCode",
            "valueType": "String",
            "value": "TOJ"
        },
        {
            "name": "idProof",
            "valueType": "TR",
            "value": "TR1225"
        },
        {
            "name": "sourceEPC",
            "valueType": "Identifying the BSS System",
            "value": "Liberate"
        }
    ]
}

Actual implemenation for JM - liberate (Response Body) 201 Created

{
    "id": "3280001",
    "account": [
        {
            "id": "328000100000"
        }
    ]
}

Actual implemenation for JM -cerillion (Request Body)

{
    "name": "TEST six",
    "contactMedium": [
        {
            "mediumType": "Address",
            "preferred": false,
            "characteristic": {
                "street1": "35",
                "street2": "sullivan avenue",
                "city": "KINGSTON",
                "stateOrProvince": "ST.ANDREW",
                "postCode": "00006",
                "country": "Jamaica"
            }
        },
        {
            "mediumType": "Telephone",
            "preferred": true,
            "characteristic": {
                "phoneNumer": "1234566789",
                "contactType": "home"
            }
        },
        {
            "mediumType": "Email",
            "preferred": false,
            "characteristic": {
                "emailAddress": "donald.slicon@silicon.com",
                "contactType": "email"
            }
        }
    ],
    "characteristic": [
        {
            "name": "dateOfBirth",
            "valueType": "yyyy-MM-dd",
            "value": "2000-06-12"
        },
        {
            "name": "title",
            "valueType": "Salutation Mr. Mrs. etc",
            "value": "Mr"
        },
        {
            "name": "gender",
            "valueType": "string",
            "value": "M"
        },
        {
            "name": "type",
            "valueType": "customerType",
            "value": "RES"
        },
        {
            "name": "idProof",
            "valueType": "TR",
            "value": "TR1227"
        },
        {
            "name": "sourceEPC",
            "valueType": "Identifying the BSS System",
            "value": "Cerillion"
        }
    ]
}

Actual implemenation for JM -cerillion (Response Body) 201 Created

{
  "customerNo": "775507"
}

Actual implemenation for PR - CSG (Request Body)

{
    "name": "Anubhav Verma",
    "contactMedium": [
        {
            "mediumType": "Address",
            "preferred": "false",
            "characteristic": {
                "street1": "279 AVE PONCE DE LEON",
                "street2": "APT 1003",
                "city": "SAN JUAN",
                "stateOrProvince": "PR",
                "postCode": "009171920"
            }
        },

        {
            "mediumType": "Telephone",
            "preferred": "true",
            "characteristic": {
                "phoneNumber": "1234567890",
                "contactType": "home"
            }
        },
        {
"mediumType": "Email",
            "preferred": "false",
            "characteristic": {
                "emailAddress": "abc.def@gmail.com",
                "contactType": "email"
            }
        }
    ],
    "characteristic": [
        {
            "name": "dateOfBirth",
            "value": "1997-02-10"
        },
        {
            "name": "title",
            "value": "mrs"
        },
        {
            "name": "salutation",
            "value": "U"
        },
        {
            "name": "type",
            "value": "RES"
        },
        {
            "name": "sourceEPC",
            "value": "CSG"
        },
        {
            "name": "idProof",
            "valueType": "DL",
            "value": "222222222"
        },
        {
            "name": "dlstate",
            "value": "PR"
        },

        {
            "name": "privacy",
            "value": "N"
        },
        {
            "name": "firstName",
            "value": "Anubhav"
        },
        {
            "name": "lastName",
            "value": "Verma"
        },

        {
            "name": "taxIdProof",
            "valueType": "SSN",
            "value": "4qfGkdlFnLvv/ai8lidn9w=="
        }
    ]
}

Actual implemenation for PR - CSG (Response Body) 201 Created

{
    “id”: “1101521501846”,
    “characteristic”: [
        {
            “name”: “businessUnit”,
            “value”: “9900”
        },
        {
            “name”: “locationId”,
            “value”: “00923122700050”
        },
        {
            “name”: “dropType”,
            “value”: “COAX”
        },
        {
            “name”: “jobType”,
            “value”: “RC”
        }
    ]
}

CR Market-b2c

note: customerType = "HOTEL" is not in scope and routing is based on lob passed in request body

Key Design Decisions
  • New B2C customers are in scope.
  • name field in the request is a combination of firstName + lastName + lastName2 from characteristics
  • Address fields values should be in Upper case
  • No data validation is present in the Mulesoft
  • Error message from the backend system is captured in the error response.
  • The legacy system that consumes the creation of the customer must respect the values of the lists of values configured in the fields.
  • The customer creation web service will only allow the creation of 1 customer at a time.
  • The value for the "Identification number" field may be sent with or without hyphens (-), always respecting the minimum and maximum number of characters and other format validations.
  • The customer that is created will have as default value in the Status field = "PROSPECT". The proper flow of the Order makes the corresponding change.
  • The position and organization of the user consuming the integration will be assigned by default.
  • The customer creation process will create an address record with the information provided, this record will be assigned as the main address. The system that consumes the web service must send the correct values from the province, canton, district and neighborhood value lists.
  • Mulesoft is converting values to upper case as per the validation in siebel.
  • The system will return an error code and message in case there is a problem creating and associating the new address and/or contact record, but the customer creation will not be interrupted. In the case of error (error in address or contact), the creation of these records will be done manually by the end user.
  • Reprocessing of request is not possible if the customer entity creation is successful.-Refer Request and Response with Name CR-B2C-Contact Id(contactId), Row Id (id) and Address Id(addressId) are required to Create Agreement, settlementAccount and to create Order-amnistia value should be empty,when “idProofType = CEDULA FISICA” or PASAPORTE
Characteristic Sub-Resource Table for request.
NameTypeY/NDescription
characteristic.name="idProof"StringYidProof of customer. CEDULA JURIDICA and INSTITUCIONES AUTÓNOMAS are applicable for B2B. There are some rules depending on the identification type:
Possible Values:
- CEDULA FISICA
Validation Rule:
/^(\0[1-9])(\d{4})(\d{4})$/g
/^\0[1-9]-\d{4}-\d{4}\$/g;

- PASAPORTE
Validation Rule:
/^([A-Za-z0-9]{8,10}?)\$/g
/^([A-Za-z0-9]{8,10}?)\$/g

- CEDULA JURIDICA
Validation Rule:
/^(\d{1})(\d{3})(\d{6})\$/g
/^\d{1}-\d{3}-\d{6}\$/g

- INSTITUCIONES AUTÓNOMAS
Validation Rule:
/^(\d{1})-([0]{3})-(\d{6})\$/g
/^(\d{1})([0]{3})(\d{6})\$/g

- CEDULA RESIDENCIA
Validation Rule:
IF the field "amnistia" has the value "Y"

/^(\d{1})(\d{3})(RE\d{6})\$/g
/^(\d{1})-(\d{3})-(RE\d{6})\$/g

ELSE IF the field "amnistia" has the value “N”

/^(\d{1})(\d{3})(\d{8})\$/g
/^(\d{1})-(\d{3})-(\d{8})\$/g. Example
{
"name":"idProof",
"value":"01-4498-5920"
}
characteristic.name="idProofType"StringYId Proof Type of customer. Accepts possible values in CAPITAL only!
Possible Values:
- CEDULA FISICA
- PASAPORTE
- CEDULA JURIDICA
- INSTITUCIONES AUTÓNOMAS
- CEDULA RESIDENCIA. Example
{
"name":"idProofType",
"value":"CEDULA FISICA"
}
characteristic.name="amnistia"StringNamnistia. Boolean Y or N. Example
{
"name":"amnistia",
"value":"N"
}
characteristic.name="fraudCategory"StringNFraud category. Fraud clasification field; possible values are:
▪ Oro
▪ Plata
▪ Bronce. Example
{
"name":"fraudCategory",
"value":"Oro"
}
characteristic.name="customerType"StringYCustomer Type. only "RESIDENCIAL" is applicable for B2C. Accepts possible values in capital and half-words , if the alphabets are in consecutive order of those possible values.
Possible Values:
▪ RESIDENCIAL
▪ MICROEMPRESA
▪ PEQUEÑA EMPRESA
▪ PROGRAMA HOGARES CONECTADOS
▪ MEDIANA EMPRESA
▪ GRAN EMPRESA
▪ EMPLEADO
▪ CORPORATIVO
▪ HOTEL. Example
{
"name":"customerType",
"value":"GRAN EMPRESA"
}
characteristic.name="customerCategory"StringNCustomer Category. It is mapped from request - characteristic.name='customerCategory'
Accepts possible values in CAPITAL only!
Possible Values
▪ CLIENTE VIP
▪ COMERCIAL
▪ EMPRESARIAL
▪ PYMES
▪ CLIENTE LEAL
▪ PHC QUINTIL 1
▪ PHC QUINTIL 2
▪ PHC QUINTIL 3
▪ CLIENTE POTENCIAL
▪ CLIENTE BASICO. Example
{
"name":"customerCategory",
"value":"CLIENTE VIP"
}
characteristic.name="role"StringYRole of Customer. Accepts possible values in CAPITAL only!
Possible Values:
▪ ABOGADO DE LA EMPRESA
▪ ADMINISTRADOR
▪ DUEÑO
▪ ESPOSA
▪ ESPOSO
▪ JEFE DE SISTEMAS
▪ COBRO
▪ ENCARGADO OPERACIONES
▪ ENCARGADO TECNICO
▪ GERENTE FINANCIERO. Example:
{
"name":"role",
"value":"DUEÑO"
}
characteristic.name="firstName"StringYFirst name. Example
{
"name":"firstName",
"value":"GILBERTO"
}
characteristic.name="lastName"StringYLast name. Example
{
"name":"lastName",
"value":"ALMEMAN "
}
characteristic.name="lastName2"StringNSecond last name. Example
{
"name":"lastName2",
"value":"TOSTY"
}
characteristic.name="gender"StringYGender of the customer. Accepts possible values in upperCase or initial Substring in upperCase.
Possible Values:
• MASCULINO
• FEMENINO
• INDEFINIDO Example
{
"name":"gender",
"value":"MASCULINO"
}
characteristic.name="lob"StringMLob. Example
{
"name":"lob",
"value":"FIXED"
}
characteristic.name="commercialName"StringY/NCommercial Name. Applicable for B2B. Mandatory field when customer type as below:
▪ MICROEMPRESA
▪ PEQUEÑA EMPRESA
▪ MEDIANA EMPRESA
▪ GRAN EMPRESA
▪ INMOBILIARIO
Note: Do not pass this field when customerType is not as above else bss will throw error!
Possible Values:
▪ MICROEMPRESA
▪ PEQUEÑA EMPRESA
▪ MEDIANA EMPRESA
▪ GRAN EMPRESA
▪ INMOBILIARIO. Example
{
"name":"commercialName",
"value":""
}
characteristic.name="hotelType"StringY/NHotel Type. Applicable for B2B. Possible Values: AEROPUERTO, PENSION, APARTOTEL, EJECUTIVO, CASINO, CLUB, DE PASO, MONTAÑA, VACACIONAL. Example
{
"name":"hotelType",
"value":"AEROPUERTO"
}
characteristic.name="hotelChain"StringY/NHotel Chain. Applicable for B2B. Possible Values: AM RESORT, BARCELO HOTELS & RESORT, C.H.E GROUP PLC, ENJOY HOTELS, ESPLENDOR, INTERCONTINETAL HOTELS GROUP, SOL MELIA, STARWOOD HOTELS & RESORT WORLD, BEST WESTERN INTERNATIONAL, CARLSON REZINDOR HOTEL GROUP, CARLSON HOSPITALITY WORLDWIDE, CHOICE HOTELS INTERNACIONAL, FIESTA HOTEL GROUP, FOUR SEASONS HOTELS & RESORTS, GLOBAL HYATT CORP, ACOMETIDA INSTALADA, AEREA EXPUESTA, DUCTO CON PIOLA, DUCTO SIN PIOLA ,HILTONS HOTELS CORP, HOSPITALITY INTERNATIONAL, MARRIOT INTERNACIONA,L NINGUNA, OCCIDENTALS HOTELS, RIU HOTELS, WYNDHAM WORLDWIDE. Example
{
"name":"hotelChain",
"value":"AM RESORT"
}
characteristic.name="district"StringYDistrict in Customer address. Example
{
"name":"district",
"value":"PUNTARENAS"
}
Characteristic Sub-Resource Table for response.
NameTypeY/NDescription
characteristic.name="addressId"StringYCustomer address id. Example
{
"name":"addressId",
"value":"1-2F741ZW"
}
characteristic.name="contactId"StringYCustomer contact id. Example
{
"name":"contactId",
"value":"1-2F741ZY"
}
Error Scenarios examples:

Reason: when name is missing

    {
  "errors": [
    {
      "code": 400,
      "message": "APIKIT:BAD_REQUEST",
      "description": "required key [name] not found"
    }
  ]
}

Reason: when email characteristic.emailAddress value is invalid

    {
  "errors": [
    {
      "code": 400,
      "message": "Correo invalido(SBL-EXL-00151)(SBL-EXL-00151)",
      "description": "Id: null,contactId: null,addressId: null"
    }
  ]
}

Reason: when address characteristic.city is missing

    {
  "errors": [
    {
      "code": 400,
      "message": "VALIDATION_CREATECUSTOMER:FAILED",
      "description": "City is mandatory"
    }
  ]
}

Reason: when address characteristic.stateOrProvince is missing
{ "errors": [ { "code": 400, "message": "VALIDATION_CREATECUSTOMER:FAILED", "description": "State or province is mandatory" } ] }

Reason: when address characteristic.street1 is missing

    {
  "errors": [
    {
      "code": 400,
      "message": "VALIDATION_CREATECUSTOMER:FAILED",
      "description": "Street1 is mandatory"
    }
  ]
}

Reason: when characteristic.idProof is missing

{
  "errors": [
    {
      "code": 400,
      "message": "VALIDATION_CREATECUSTOMER:FAILED",
      "description": "IdProof is mandatory"
    }
  ]
}

Reason : when characteristic.idProofType value is invalid

    {
  "errors": [
    {
      "code": 400,
      "message": "El valor del campo Location Type del business component Account no coincide con ningún valor de la lista de selección enlazada Training Location Type Picklist.(SBL-DAT-00225)",
      "description": "Id: null,contactId: null,addressId: null"
    }
  ]
}

Reviews